package 天梯;

/**
 * @ClassName : L1d002twenty
 * @Author : LV88VL
 * @Date: 2021/4/26 17:42
 * @Description : L1-002 打印沙漏 (20 分)
 *                  问题：
 *                      1.。很多   不理解的还是很多
 *                          第一次复习：能大概看懂代码的思路
 */
import java.util.Scanner;
public class L1d002twenty {
    public static void main(String []args){
        Scanner sc =new Scanner(System.in);
        int a = sc.nextInt();
        String b= sc.next();
        int c[]=new int[25];
        c[1]=1;
        for (int i = 2; i <25 ; i++) {
            c[i]=c[i-1]+2;
        }
        int i;
        int s=1;
        for (i = 2;  i < 25; i++) {
            if (s <= a) {
                s+=c[i]*2;
            }else{
                s-=c[i-1]*2;
                i-=2;
                break;
            }
        }
        if (a<7){
            System.out.println(b);
        }else{
            for (int j = i; j > 0; j--) {
                print(j,i,c,b);
            }
            for (int j = 2; j < i+1; j++) {
                print(j,i,c,b);
            }
        }
        System.out.println(a-s);
    }
    public static void print(int j,int i,int c[],String b){
        for (int k = 0; k <(c[i]-c[j])/2 ; k++) {
            System.out.print(" ");
        }
        for (int k = 0; k < c[j]; k++) {
            System.out.print(b);
        }
        System.out.println();
    }
}
